/******************************************************************************
* @file 	zbUtils.h 
* @brief  header file 
******************************************************************************
*/
#ifndef __ZBUTILS_H
#define __ZBUTILS_H

#include "main.h"

// circular buffer
// structs for circular buffer
typedef struct{
	u8 buffer[1024];
	u16 start;	// oldest element 
	u16 end;  	// where to write new element 
	u16 size; 	// max number of elements
} cBuffer, *pcBuffer;

// data conversion
void u32ToBytes(u32 value, u8 buffer[]);
u32 bytesToU32(u8 buffer[]);
u16 bytesToU16(u8 buffer[]);


#endif
